package com.esri.core.internal.map;

import com.esri.core.renderer.RasterRenderer;

/* loaded from: classes.dex */
public class RasterLayerInternal {
    private static native boolean nativeBindFileSource(long j, long j2);

    private static native long nativeCreateLayer(Object obj);

    private static native float nativeGetBrightness(long j);

    private static native float nativeGetContrast(long j);

    private static native float nativeGetGamma(long j);

    private static native int nativeGetSpatialReference(long j);

    private static native void nativeSetBrightness(long j, float f);

    private static native void nativeSetContrast(long j, float f);

    private static native void nativeSetGamma(long j, float f);

    private static native void nativeSetRenderer(long j, String str);

    public static long a(Object obj) {
        return nativeCreateLayer(obj);
    }

    public static boolean a(long j, long j2) {
        if (j == 0 || j2 == 0) {
            return false;
        }
        return nativeBindFileSource(j, j2);
    }

    public static void a(long j, RasterRenderer rasterRenderer) {
        if (rasterRenderer != null) {
            try {
                nativeSetRenderer(j, rasterRenderer.toJson());
            } catch (Exception e) {
                throw new RuntimeException(e);
            }
        }
    }

    public static float a(long j) {
        if (j != 0) {
            return nativeGetBrightness(j);
        }
        return Float.NaN;
    }

    public static void a(long j, float f) {
        if (j != 0) {
            nativeSetBrightness(j, f);
        }
    }

    public static float b(long j) {
        if (j != 0) {
            return nativeGetContrast(j);
        }
        return Float.NaN;
    }

    public static void b(long j, float f) {
        if (j != 0) {
            nativeSetContrast(j, f);
        }
    }

    public static float c(long j) {
        if (j != 0) {
            return nativeGetGamma(j);
        }
        return Float.NaN;
    }

    public static void c(long j, float f) {
        if (j != 0) {
            nativeSetGamma(j, f);
        }
    }

    public static int d(long j) {
        return nativeGetSpatialReference(j);
    }
}
